//
//  IFirstCell.m
//  jiyujiaProgram
//
//  Created by SSIC on 16/3/2.
//  Copyright © 2016年 中良 赵. All rights reserved.
//

#import "IFirstCell.h"


@interface IFirstCell ()

@property (nonatomic, copy) NSString *photo;

@end


@implementation IFirstCell


- (void)awakeFromNib {
    // Initialization code
}


- (void)setCellWithIndexPath:(NSIndexPath *)indexPath
{
    [self.saveButton setTitleColor:ECCOLOR(255, 255, 255, 1) forState:UIControlStateNormal];
    self.saveButton.backgroundColor = NAVC_COLOR;
    self.saveButton.clipsToBounds = YES;
    self.saveButton.layer.cornerRadius = 5;
    
    
    [self.cancleButton setTitleColor:NAVC_COLOR forState:UIControlStateNormal];
    self.cancleButton.layer.borderWidth = .5;
    self.cancleButton.layer.borderColor = [NAVC_COLOR CGColor];
    self.cancleButton.clipsToBounds = YES;
    self.cancleButton.layer.cornerRadius = 5;
}


- (IBAction)save:(id)sender
{
    if ([self.delegate respondsToSelector:@selector(firstSaveClick:Name:ID:)]) {
        [self.delegate firstSaveClick:sender Name:self.nameText.text ID:self.idText.text];
    }
}


- (IBAction)cancle:(id)sender
{
    if ([self.delegate respondsToSelector:@selector(firstCancleClick:)]) {
        [self.delegate firstCancleClick:sender];
    }
}


- (IBAction)photo:(id)sender
{
    
    [self.nameText resignFirstResponder];
    [self.idText resignFirstResponder];
    
    if ([self.delegate respondsToSelector:@selector(firstPhotoClick:)]) {
        [self.delegate firstPhotoClick:sender];
    }
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
